#define RERR_SHUT_DOWN MAKE_RERR( 0x0001 ) // serious error, asking implementation to shut down immediately
#define RERR_STORE_REPLACED MAKE_RERR( 0x0002 ) // the store was replaced.
#define RERR_CANCEL MAKE_RERR( 0x0003 ) // user cancel the operation
#define RERR_RESTART MAKE_RERR( 0x0004 ) // restart the operation, applicable in RSC_END_SYNC & RSC_END_CHECK
#define RERR_IGNORE MAKE_RERR( 0x0005 ) // used by IReplStore::GetConflictInfo.
#define RERR_UNLOAD MAKE_RERR( 0x0006 ) // used by IReplStore::ActivateDialog or IReplStore::IsFolderChanged to request unloading of replication modules
#define RERR_OBJECT_DELETED MAKE_RERR( 0x0007 ) // used by IReplStore::IsValidObject, indicates the object identified by the hObject is deleted
#define RERR_CORRUPT MAKE_RERR( 0x0008 ) // used by IReplStore::IsValidObject, indicates the object identified by the hObject is corrupted
#define RERR_NO_DEVICE MAKE_RERR( 0x0009 ) // returned by IReplNotify::QueryDevice. indicates no selected or connected device exists
#define RERR_NO_ERR_PROMPT MAKE_RERR( 0x0010 ) // returned by IReplStore::Initialize. indicates error initializing. No UI is needed to show this error.
#define RERR_DISCARD MAKE_RERR( 0x0011 ) // returned by IReplObjHandler::SetPacket. indicates this object should be discarded from the device immediately.
#define RERR_DISCARD_LOCAL MAKE_RERR( 0x0012 ) // returned by IReplObjHandler::SetPaket. indicates this object should be discarded from the desktop only.
#define RERR_VOL_INACTIVE MAKE_RERR( 0x0013 ) // returned by IReplObjHandler::GetPacket && IReplObjHandler::SetPacket, the volume has become inactive.
#define RERR_BIG_OBJ_TYPE MAKE_RERR( 0x0014 ) // returned by IReplNotify::QueryDevice on QDC_SYNC_DATA
#define RERR_BIG_CODE MAKE_RERR( 0x0015 ) // returned by IReplNotify::QueryDevice on QDC_SYNC_DATA
#define RERR_UNMATCHED MAKE_RERR( 0x0016 ) // returned by IReplNotify::QueryDevice on QDC_SYNC_DATA
#define RERR_DEVICE_WIN MAKE_RERR( 0x0017 ) // returned by IReplStore::GetConflictInfo, resolve the conflict so device object wins
#define RERR_DESKTOP_WIN MAKE_RERR( 0x0018 ) // returned by IReplStore::GetConflictInfo, resolve the conflict so desktop object wins
#define RERR_SKIP_ALL_OBJ MAKE_RERR( 0x0019 ) // returned by IReplStore::ReportStatus on RSC_WRITE_OBJ_FAILED, skip sync of all remaining objects
// use by IReplObjHandler
#define RERR_SKIP_ALL MAKE_RERR( 0x0100 ) // skip all incoming packets because of write errors
#define RERR_BAD_OBJECT MAKE_RERR( 0x0101 ) // this is a bad object because of read error, server should not try to replicate it again
#define RERR_TRY_AGAIN MAKE_RERR( 0x0102 ) // this is a bad object because of read error, server should can try to replicate it again later
#define RERR_USER_SKIP MAKE_RERR( 0x0103 ) // object skipped by the user
// these are warning codes
#define RWRN_LAST_PACKET MAKE_RWRN( 0x0001 )
// flags used in RSC_BEGIN_SYNC
#define BSF_AUTO_SYNC ((UINT)0x00000001) // sync get started as a result of changes while auto. sync on change is turned on
#define BSF_REMOTE_SYNC ((UINT)0x00000002) // consistent with RSC_REMOTE_SYNC, set if we are sync'ing remotely
#define BSF_RESERVED ((UINT)0x80000000) // Reserved by ActiveSync server.
// Code for ReportStatus
#define RSC_BEGIN_SYNC ((UINT)1) // Synchronization is about to start, uReserved is combination of bit flags, see BSF_* above
#define RSC_END_SYNC ((UINT)2) // Synchronization is about to end
#define RSC_BEGIN_CHECK ((UINT)3) // FindFirstItem is about to be called, followed by FindNextItem
#define RSC_END_CHECK ((UINT)4) // FindItemClose has been called
#define RSC_DATE_CHANGED ((UINT)5) // System Date has changed, this is called for each known desktop object
#define RSC_RELEASE ((UINT)6) // Replication is about to release the store
#define RSC_REMOTE_SYNC ((UINT)7) // Indicates if remote sync is enabled. uParam will TRUE if all sync
// will be remote until this status is reported again with uParam set to FALSE
#define RSC_INTERRUPT ((UINT)8) // interrupt current operation
#define RSC_BEGIN_SYNC_OBJ ((UINT)9) // Synchronization is about to start on an object type. uReserved points to
#define RSC_END_SYNC_OBJ ((UINT)10) // Synchronization is about to end on an object type.
#define RSC_OBJ_TYPE_ENABLED ((UINT)11) // Synchronization of the given object is enabled, hFolder is indeed a pointer to a string (object type name)
#define RSC_OBJ_TYPE_DISABLED ((UINT)12) // Synchronization of the given object is disabled, hFolder is indeed a pointer to a string (object type name)
#define RSC_BEGIN_BATCH_WRITE ((UINT)13) // A series of SetPacket will be called on a number of objects, this is the right time for some service providers to start a transaction
#define RSC_END_BATCH_WRITE ((UINT)14) // above write ends, this is the right time for some service providers to commit the transaction
#define RSC_CONNECTION_CHG ((UINT)15) // connection status has changed. uParam is TRUE if connection established. FALSE otherwise.
#define RSC_WRITE_OBJ_FAILED ((UINT)16) // failed writing an object on the device. uParam is the HRESULT code.
#define RSC_DELETE_OBJ_FAILED ((UINT)17) // failed deleting an object on the device. uParam is the HRESULT code.
#define RSC_WRITE_OBJ_SUCCESS ((UINT)18) // writing of an object succeeded on the device. uParam is a pointer to SDREQUEST (with (lpbData, cbData) representing the volume ID)
#define RSC_DELETE_OBJ_SUCCESS ((UINT)19) // deletion of an object succeeded on the device. uParam is a pointer to SDREQUEST (with (lpbData, cbData) representing the volume ID)
#define RSC_READ_OBJ_FAILED ((UINT)20) // failed to read an object from the device. uParam is the HRESULT code
#define RSC_TIME_CHANGED ((UINT)21) // System time has changed, this is called only once.